﻿using System;
using System.Data;
using System.Web.UI.WebControls;
using ASPNETVN.PORTAL.Components.Helpers;
using ASPNETVN.PORTAL.Components.Security;
using ASPNETVN.PORTAL.Components.UI;
using LMHTX.Modules.DIRECTORY.TEAM.Components;
using ASPNETVN.PORTAL.Components.Share;
using System.Web;

namespace LMHTX.Modules.DIRECTORY.TEAM.Controls
{
    public partial class Detail : ModulePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.ItemID != 0)
            {
                Components.Team team = Components.Team.Load(this.ItemID);
                Career career = Career.Load(team.CareerID);
                Components.Type type = Components.Type.Load(team.TypeID);
                Training training = Components.Training.Load(team.TrainingID);
                Area area = Components.Area.Load(team.AreaID);

                lblTitle.Text = team.Title;
                lblTeamLeader.Text = team.TeamLeader;
                lblType.Text = type.Title;
                lblArea.Text = area.Title;
                lblTraining.Text = training.Title;
                lblCareer.Text = career.Title;

                lblCharterCapital.Text = team.CharterCapital.ToString();
                lblWorkingCapital.Text = team.WorkingCapital.ToString();
                lblFixedCapital.Text = team.FixedCapital.ToString();
                lblTurnover.Text = team.Turnover.ToString();
                lblProfit.Text = team.Profit.ToString();
                lblLabourNum.Text = team.LabourNum.ToString();
                lblTeamMember.Text = team.TeamMember.ToString();
                lblComment.Text = HttpUtility.HtmlDecode(team.Comment);
                
            }
        }
    }
}